import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import axios from 'axios';
import config from "./config/config";
import apis from './apis/index'
import store from './store'
import util from '@/utils/util';


import 'amfe-flexible';
import Vant from 'vant';
import 'vant/lib/index.less';
import './assets/less/common.less';

Vue.use(Vant);
Vue.config.productionTip = false;
Vue.prototype.$axios= axios;
Vue.prototype.$apis = apis; // api
Vue.prototype.$config=config;
Vue.prototype.$store = store;
Vue.prototype.$utils = util;

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
});
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
